#ifndef BAIDUHANDICT_H
#define BAIDUHANDICT_H

#include <QObject>
#include <QEventLoop>

class QNetworkAccessManager;
class QDomElement;

class BaiduHanDict
{
public:
    static BaiduHanDict& instance()
    {
        static BaiduHanDict baiduHanDict;
        return baiduHanDict;
    }

    QString HanDict(QString keyWord);

private:
    BaiduHanDict();
    QEventLoop loop;
    QNetworkAccessManager *manager;
    QByteArray getUrlRawContent(QString url_str);
    QString innerText (const QDomElement &domElement, QString classValue="");
};



#endif // BAIDUHANDICT_H
